Class PasswordChecker

java.lang.Object
com.netscape.cms.password.PasswordChecker

public class PasswordChecker extends Object
This class checks the given password if it meets the specific requirements. For example, it can also specify the format of the password which has to be 8 characters long and must be in alphanumeric.
  • Constructor Details

    • PasswordChecker

      public PasswordChecker()
      Default constructor.
    • PasswordChecker

      public PasswordChecker(int minSize, int minUpperLetter, int minLowerLetter, int minNumber, int minSpecialChar, int seqLength, int maxRepeatedChar, boolean cracklibCheck)
  • Method Details

    • isGoodPassword

      public boolean isGoodPassword(String pwd) throws EPasswordCheckException
      Returns true if the given password meets the quality requirement; otherwise returns false.
      Parameters:
      pwd - The given password being checked.
      Returns:
      true if the password meets the quality requirement; otherwise returns false.
      Throws:
      EPasswordCheckException - If there is a configuration problem with the password checker
    • getReason

      public String getReason()
      Returns a reason if the password doesn't meet the quality requirement.
      Returns:
      string as a reason if the password quality requirement is not met.
    • getReason

      public String getReason(Locale loc)
      Returns a reason if the password doesn't meet the quality requirement.
      Parameters:
      loc -
      Returns:
      string as a reason if the password quality requirement is not met.
    • getMinSize

      public int getMinSize()
    • setMinSize

      public void setMinSize(int minSize)
    • getMinUpperLetter

      public int getMinUpperLetter()
    • setMinUpperLetter

      public void setMinUpperLetter(int minUpperLetter)
    • getMinLowerLetter

      public int getMinLowerLetter()
    • setMinLowerLetter

      public void setMinLowerLetter(int minLowerLetter)
    • getMinNumber

      public int getMinNumber()
    • setMinNumber

      public void setMinNumber(int minNumber)
    • getMinSpecialChar

      public int getMinSpecialChar()
    • setMinSpecialChar

      public void setMinSpecialChar(int minSpecialChar)
    • getSeqLength

      public int getSeqLength()
    • setSeqLength

      public void setSeqLength(int seqLength)
    • getMaxRepeatedChar

      public int getMaxRepeatedChar()
    • setMaxRepeatedChar

      public void setMaxRepeatedChar(int maxRepeatedChar)
    • isCracklibCheck

      public boolean isCracklibCheck()
    • setCracklibCheck

      public void setCracklibCheck(boolean cracklibCheck)